
<div class="tab-content">
  <div class="tab-pane active">
    <div class="tab-aside">
      <div class="tab-aside-content">
        <div class="tab-aside-group header" ui-sref-active="active">
          <a class="group-text" ui-sref=".({tag:'all'})">全部</a>
        </div>
        <div class="tab-aside-group" ng-repeat="tag in tags" ng-mouseleave="tag.$$activeDel=false" ui-sref-active="active">
          <a class="group-text" ui-sref=".({tag:tag.id})">{{tag.name}}</a>
          <span class="group-close" ng-click="tag.$$activeDel=true" ng-if="!isPublic || isAdmin"><i class="fa fa-times"></i></span>
          <span class="del-btn" ng-click="deleteTag(tag.id)" ng-class="{'active': tag.$$activeDel}">删除</span>
        </div>
        <div class="tab-aside-group footer stack1 transparent" ng-click="create()" ng-if="isAdmin || !isPublic">
          <span class="group-text"><i class="icon-plus"></i>添加分组</span>
        </div>
        <div class="tab-aside-group footer">
          <span class="group-text"><i class="fa fa-cloud-upload"></i>上传图片</span>
          <input uploader="" files="store.totalData" upload-type="store.type" is-public="store.isPublic" type="file" multiple="multiple" accept="image/*" class="upload-mask">
        </div>
      </div>
    </div>
    <div class="templates-wrap tab-main">
      <div class="tab-main-content" ng-class="{padding: !(isAdmin || !isPublic)}">
        <div class="tab-manage clearfix" ng-if="isAdmin || !isPublic">
          <div class="pull-left tab-manage-btn" ng-show="!vm.isOperating">
            <span ng-click="vm.isOperating=true">管理</span>
          </div>
          <div class="pull-left tab-manage-btn" ng-show="vm.isOperating">
            <span ng-click="deleteImages()">删除</span>
            <span ng-click="cancelSelect()">取消选择</span>
          </div>
          <!-- 全部 -->
          <div class="pull-left tab-manage-btn" ng-show="vm.isOperating" ng-if="$stateParams.tag=='all'">
            <span>加入分组:</span>
          </div>
          <div class="pull-left" style="width:100px;" ng-show="vm.isOperating" ng-if="$stateParams.tag=='all'">
            <select class="form-control" ng-change="moveToTag(currentGroup)" ng-model="currentGroup">
              <option value="">选择分组</option>
              <option ng-repeat="tag in tags" value="{{tag.id}}">{{tag.name}}</option>
            </select>
          </div>
          <!-- 全部 end -->

          <!-- tag -->
          <div class="pull-left tab-manage-btn" ng-show="vm.isOperating" ng-if="$stateParams.tag != 'all'">
            <span ng-click="moveFromTag($stateParams.tag)">移出分组</span>
          </div>
          <!-- tag end -->
        </div>

        <div class="images-items" style="margin-top:15px;" ng-class="{'focused':vm.isOperating}">
          <div class="images-item-wrap" ng-repeat="img in store.totalData | tag: $stateParams.tag | page: store.currentPage: 28">
            <div class="images-item" ng-class="{active:img.active,error:img.$$status==10,loading:img.$$status==20}" ng-click="selectItem($event,img)" ng-mouseleave="img.$$showDelete=false">
              <span class="checked" ng-class="{'active':img.$$isSelect}"><i class="icon-check"></i></span>
              <span class="images-item-loading" ng-if="!img.$$url"></span>
              <span class="images-item-del" ng-click="img.$$showDelete=true;$event.stopPropagation()"><i class="fa fa-times"></i></span>
              <span class="images-item-del-btn" ng-show="img.$$showDelete" ng-click="deleteImage(img.id, $index)">删除</span>
              <img ng-src="{{img.$$url}}" ng-if="img.$$url">
            </div>
          </div>
        </div>

        <div class="pagination-bar">
          <pagination boundary-links="true" max-size="store.maxSize" items-per-page="28" total-items="store.totalItems" ng-model="store.currentPage" first-text="首页" last-text="尾页" previous-text="&lsaquo;" next-text="&rsaquo;" rotate="false" num-pages="store.numPages"></pagination>
        </div>
      </div>
    </div>
  </div>
</div>